<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.bootcss.com/vue/2.5.13/vue.js"></script>
    <title>Document</title>
</head>
<body>
    <div id='app'>
        <p>{{ name }}</p>
        <input type="text" v-model="name">
    </div>

    <script>
        var app = new Vue({
            el: '#app',
            data: {
                name: ''
            },
            watch:{
                name: function(){
                    console.log(this.name);
                }
            }
        })
    </script>
</body>
</html>